﻿using System;
using System.Collections.Generic;
using System.Text;
using Slf.Factories;

namespace Slf.Samples.NamedLoggers
{
  public class GreenConsoleLogger : ConsoleLogger
  {
    public GreenConsoleLogger(string name) : base(name)
    {
    }

    public override void Log(LogItem item)
    {
      Console.ForegroundColor = ConsoleColor.Green;
      base.Log(item);
      Console.ResetColor();
    }
  }


  public class GreenConsoleFactory : NamedLoggerFactoryBase<GreenConsoleLogger>
  {
    protected override GreenConsoleLogger CreateLogger(string name)
    {
      return new GreenConsoleLogger(name);
    }
  }
}
